package com.wanxi.util;

public class MyMath {
    public static void main(String[] args) {


//        while (true) {
//            double random = Math.random();
//            int nextInt = (int) (random * 6);
//            System.out.println(nextInt + 1);
//
//        }
//        Math.max(2, 4);
//        Math.ceil(1.3456);返回大于当前浮点数的最小整数，向上取整
        int floor = (int) Math.floor(-1.322);//向下取整
        System.out.println(floor);
        long round = Math.round(-3.5);//四舍五入
        System.out.println(round);
        Math.abs(-1);//绝对值

    }
}
